<template>
  <div :class="['loginbox',{'show':show}]">
    <div :class="['login',{'enter':enter}]">
      <div class="top">
        <div class="topbox" @click.stop="hidelogin">
          <i class="iconfont icon-guanbi"></i>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["show"],
  data() {
    return {
      enter: false,
    };
  },
  methods: {
    
    //检查登录状态
    checkloginson() {
      this.$emit("checkloginson");
    },
    //隐藏登录页面
    hidelogin() {
      this.$emit("hideloginson");
      setTimeout(() => {
        this.enter = false;
      }, 1000);
    },
    
  },
};
</script>

<style lang="less">
.mainlogin {
  width: 100%;
  height: 100vh !important;
}
.loginbox {
  width: 100%;
  height: 100vh;
  z-index: 1000;
  position: fixed;
  top: 100%;
  left: 0;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
  &.show {
    top: 0;
  }
  .login {
    background-color: #c73e2c;
    width: 100%;
    height: 100%;
    &.enter {
      background-color: white;
      .top {
        .topbox {
          i {
            color: #333 !important;
          }
        }
      }
    }
    .top {
      padding: 0 15px;
      padding-top: 60px;
      height: 30px;
      line-height: 30px;
      .topbox {
        position: relative;
        .title {
          position: absolute;
          text-align: center;
          width: 100%;
          height: 30px;
          line-height: 34px;
          top: 0;
          color: #333;
          letter-spacing: 1px;
          font-size: 20px;
          font-weight: bold;
        }
        i {
          font-size: 24px;
          color: rgba(255, 255, 255, 0.7);
        }
      }
    }
  }
}
</style>